const state = {
  // 未读消息数
  unReadMsgCount: 0
}

const mutations = {}

const actions = {
  updateUnReadMsgCount({
    commit
  }, count) {
    console.log("...." + count)
    if (count > 99) {
      count = "99+"
    }
    state.unReadMsgCount = count;
  }
}

export default {
  // namespaced: true 的方式使其成为带命名空间的模块。保证在变量名一样的时候，添加一个父级名拼接。
  namespaced: true,
  state,
  mutations,
  actions
}
